As a controller for a machine tool, conventionally, the controller disclosed in the Japanese Unexamined Patent Application Publication No. 7-227739 is known, for example. This controller has a program storage section in which an NC program is stored, an override switch for changing, when the NC program stored in the program storage section is executed, a feed rate and a rotational speed of spindle which are commanded in the NC program, an override value storage section in which an override value of the override switch is stored, an editing section editing the NC program stored in the program storage section on the basis of the override value stored in the override-value storage section and thereby changing a feed rate and a rotational speed of spindle which are commanded in the NC program into the feed rate and the rotational speed of spindle which correspond to the override values.
In this controller, when the override switch is operated during the execution of the NC program, the then override value is stored in the override-value storage section and a command value (a feed rate or a rotational speed of spindle) in the NC program is changed into the command value corresponding to the override value.
Further, in addition to this controller, a controller having an editing function in which data is input directly by an operator and thereby a command value and a code, such as a feed rate, a rotational speed of spindle and a moving position, are changed and a parameter, such as tool offset amount and workpiece origin offset amount, is changed.